// ml:run = $bin > input
#include <iostream>
#include <algorithm>
#include <ctime>
#include <cstdlib>

int main()
{
	std::srand(std::time(0));
    int T = 1;
    std::cout << T << "\n";
	int n = 10, upper = 100;
	std::cout << n << '\n';
	for (int i = 0 ; i < n; i++)
		std::cout << (rand() % upper) + 1 << " ";
    int q = 10;
    std::cout << "\n" << q << "\n";
    for (int i = 0; i < q; i++) {
        int l = (rand() % n) + 1;
        int r = (rand() % n) + 1;
        if (l > r) std::swap(l, r);
        std::cout << l << " " << r << "\n";
    }
}

